//
//  YHYAddWorkViewController.m
//  Home
//
//  Created by 杨泓晔 on 16/4/19.
//  Copyright © 2016年 LanJue. All rights reserved.
//

#import "YHYAddWorkViewController.h"
#import "YHYDesignerPersonViewController.h"
#import "YHYDesignerPTableViewCell.h"
@interface YHYAddWorkViewController ()<UITableViewDataSource,UITableViewDelegate,UITextViewDelegate>
//@property (strong, nonatomic) IBOutlet UITextField *workName;
@property (strong, nonatomic) IBOutlet UIButton *saveButton;
@property (nonatomic, strong) UITableView *myTableView;
@property (nonatomic, strong) NSMutableArray *array;
@property (nonatomic,strong)UITextField *myTextfield;

@property (nonatomic,strong) UITextView *textV;
@property (nonatomic,strong) UILabel *uilabel;
@property (nonatomic,strong) UILabel *numLabel;

@property (nonatomic, retain) UITextField *nameTextField;
//@property (nonatomic, retain) UILabel *numLabel;
@property (nonatomic, assign) BOOL isSelect;
//@property (nonatomic, retain) UILabel *uilabel;
@property (nonatomic, assign) NSInteger intA;
@property (nonatomic, assign) NSInteger numChiese;
@property (nonatomic,retain) UIButton *button;

@end

@implementation YHYAddWorkViewController
- (void)viewWillAppear:(BOOL)animated {
    
    self.tabBarController.tabBar.hidden = YES;
    self.title = @"工作经历";
}

-(void) viewWillDisappear:(BOOL)animated
{
    self.tabBarController.tabBar.hidden=NO;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = LV;
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"back"] style:UIBarButtonItemStylePlain target:self action:@selector(Back:)];
    self.navigationItem.leftBarButtonItem.tintColor = [UIColor whiteColor];
    

    // Do any additional setup after loading the view from its nib.
    _myTableView  = [UITableView new];
    _array = [NSMutableArray arrayWithObjects:@"职位类型" ,@"职位名称",@"公司名称",@"公司行业",@"职位标签",@"时间段",@"所属部门",@"工作内容",@"工作业绩", nil];
    [self.view addSubview:_myTableView];
    [_myTableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.view);
        make.left.mas_equalTo(self.view);
        make.width.mas_equalTo(self.view);
    
        make.height.mas_equalTo(self.view);
    }];
    _myTableView.scrollEnabled = NO;
    _myTableView.rowHeight = ROWHEIGHT * AUTO_HEIGHT;
    _myTableView.delegate = self;
    _myTableView.dataSource  = self;
    self.myTableView.backgroundColor = LV;
    _myTableView.tableFooterView=[[UIView alloc]init];
    
   
    [_myTableView registerClass:[YHYDesignerPTableViewCell class] forCellReuseIdentifier:@"YHYDesignerPTableViewCell"];

}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return _array.count;
}



- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *str = @"YHYDesignerPTableViewCell";
    YHYDesignerPTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:str];
    
    cell.xmLabel.text = _array[indexPath.row];
    
    
    return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    NSLog(@"dsad");
}
//- (IBAction)save:(UIButton *)sender {
//    NSString *str = _textV.text;
//   
//    [self.navigationController popViewControllerAnimated:YES];
//    
//   // [self.delegate presentworkName:str];
//    [self.delegate presentAddWorkName:str];
//    
//}


-(void)Back:(UIButton *) goback
{
    [self.navigationController popViewControllerAnimated:YES];
}


@end
